<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:79:"/Users/juyaobin/Desktop/clover_download/application/index/view/index/index.html";i:1555499892;}*/ ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>CloverDownload</title>
    <link rel="stylesheet" href="/public/bootcss/css/bootstrap.min.css" crossorigin="anonymous">
    <script src="/public/bootcss/js/jquery.slim.min.js" crossorigin="anonymous"></script>
    <script src="/public/bootcss/js/popper.min.js" crossorigin="anonymous"></script>
    <script src="/public/bootcss/js/bootstrap.min.js" crossorigin="anonymous"></script>
    <script src="/public/jquery/jquery-3.3.1.min.js"></script>
    <script src="/public/jquery/plug-in.js"></script>
    <style>
        td {
            text-align: center
        }

        th {
            text-align: center
        }
    </style>
</head>

<body>
    <!-- 暗色主题 请加入 class="table-dark"  -->

    <table class="table">
        <!-- 暗色主题 请加入 class="table-dark"  -->

        <ul class="nav justify-content-center">
            <li class="nav-item">
                <a class="nav-link active" href="/">首页</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="http://mmqogy.cn">个人博客</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" data-toggle="modal" data-target="#Sponsorship" href="#">赞助我</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" data-toggle="modal" data-target="#exampleModalCenter" href="#">百度云账号共享</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" data-toggle="modal" data-target="#Contact" href="#">联系我</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="<?php echo url('help/index/index'); ?>">疑难解答</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="<?php echo url('upload/index/index'); ?>">投递我的clover</a>
            </li>
            <!-- <li class="nav-item">
                <a class="nav-link" href="<?php echo url('upload/index/index'); ?>">前往论坛</a>
            </li> -->
        </ul>
        <thead>
            <tr id='temp_title'>
                <th scope="col">#</th>
                <th scope="col">文件名/文件夹名</th>
                <th scope="col">加入时间</th>
            </tr>
        </thead>
        <tbody id='list'>
            <?php if(is_array($class) || $class instanceof \think\Collection || $class instanceof \think\Paginator): $i = 0; $__LIST__ = $class;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
            <tr>
                <th><svg class="icon"
                        style="width: 1em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;"
                        viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2544">
                        <path
                            d="M912 208H427.872l-50.368-94.176A63.936 63.936 0 0 0 321.056 80H112c-35.296 0-64 28.704-64 64v736c0 35.296 28.704 64 64 64h800c35.296 0 64-28.704 64-64v-608c0-35.296-28.704-64-64-64z m-800-64h209.056l68.448 128H912v97.984c-0.416 0-0.8-0.128-1.216-0.128H113.248c-0.416 0-0.8 0.128-1.248 0.128V144z m0 736v-96l1.248-350.144 798.752 1.216V784h0.064v96H112z"
                            p-id="2545"></path>
                    </svg></th>
                <td onclick="GetList('<?php echo $vo['name']; ?>','<?php echo $vo['add_time']; ?>')"><?php echo $vo['name']; ?></td>
                <td><?php echo $vo['add_time']; ?></td>
            </tr>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
    </table>
    <script>
        function GetList(name, time) {
            $.ajax({
                type: "POST",
                url: "<?php echo url('index/index/GetList'); ?>",
                data: {
                    name: name
                },
                dataType: "JSON",
                success: function (response) {
                    console.log(response);
                    if (response.msg) {
                        var text = '<tr>' +
                            '<th><svg class="icon" style="width: 1em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8223"><path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8c-16.4 12.8-16.4 37.5 0 50.3l450.8 352.1c5.3 4.1 12.9 0.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" p-id="8224"></path></svg></th>' +
                            '<td onclick="back()">返回上一页</td>' +
                            '<td>' + time + '</td>' +
                            '<td>undefined</td>' +
                            '</tr>';
                        $('#list').empty();
                        response.msg.forEach(value => {
                            text += '<tr>' +
                                '<th><svg class="icon" style="width: 1em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9752"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM382 896h-0.2L232 746.2v-0.2h150v150z" p-id="9753"></path></svg></th>' +
                                '<td onclick="Download(\'' + value.name + '\')">' + value.name + '</td>' +
                                '<td>' + value.add_time + '</td>' +
                                '<td>' + (value.size / 1024 / 1024).toFixed(2) + 'MB</td>' +
                                '</tr>';
                        });
                        $('#list').append(text);
                        $('#temp_title').append('<th id="size" scope="col">大小</th>');

                    }
                }
            });
        }
        function back() {
            $.ajax({
                type: "POST",
                url: "<?php echo url('index/index/GetHomeList'); ?>",
                data: {},
                dataType: "JSON",
                success: function (response) {
                    console.log(response);
                    if (response.msg) {
                        var text = '';
                        $('#list').empty();
                        $('#size').remove();
                        response.msg.forEach(value => {
                            text +=
                                '<tr>' +
                                '<th><svg class="icon" style="width: 1em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14969"><path d="M912 208H427.872l-50.368-94.176A63.936 63.936 0 0 0 321.056 80H112c-35.296 0-64 28.704-64 64v736c0 35.296 28.704 64 64 64h800c35.296 0 64-28.704 64-64v-608c0-35.296-28.704-64-64-64z m-800-64h209.056l68.448 128H912v97.984c-0.416 0-0.8-0.128-1.216-0.128H113.248c-0.416 0-0.8 0.128-1.248 0.128V144z m0 736v-96l1.248-350.144 798.752 1.216V784h0.064v96H112z" p-id="14970"></path></svg></th>' +
                                '<td onclick="GetList(\'' + value.name + '\',\'' + value.add_time + '\')">' + value.name + '</td>' +
                                '<td>' + value.add_time + '</td>' +
                                '</tr>';
                        });
                        $('#list').append(text);

                    }
                }
            });
        }
        function Download(name) {
            $.ajax({
                type: "POST",
                url: '<?php echo url("index/index/GetInfo"); ?>',
                data: {
                    name: name
                },
                dataType: "json",
                success: function (response) {
                    if (response.code) {
                        $.Pop(response.msg.info, 'alert', function () { window.location.href = response.msg.link; })
                    } else {
                        alert(response.msg);
                    }
                }
            });
        }
    </script>
    <!-- 弹出层 百度云的 -->
    <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog"
        aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLongTitle">⚠️警告</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    请勿存储违法违规东西
                    <br>
                    百度云微博登陆
                    17100621941 密码 dh86527
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
    <!-- 弹出层 -->
    <!-- 弹出层 赞助的 -->
    <div class="modal fade" id="Sponsorship" tabindex="-1" role="dialog" aria-labelledby="SponsorshipTitle"
        aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLongTitle">支付宝&微信&QQ</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>

                <div class="modal-body" style="float:left">
                    <img style="width: 100%;" src="https://ws3.sinaimg.cn/large/006wvbvUly1g1xjx8e0bsj31jk0ik7jf.jpg"
                        alt="" srcset="">
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
    <!-- 弹出层 -->
    <!-- 弹出层 联系我 -->
    <div class="modal fade" id="Contact" tabindex="-1" role="dialog" aria-labelledby="ContactTitle" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLongTitle">欢迎各位入群</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <img style="width: 100%;" src="https://wx2.sinaimg.cn/large/006wvbvUly1g1xk6mz6udj30f00kkgmq.jpg"
                        alt="" srcset="">
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
    <!-- 弹出层 -->



</body>

</html>